﻿using Microsoft.Extensions.DependencyInjection;
using System.Net.Http;
using System.Windows;

namespace FileApp
{
    /// <summary>
    /// App.xaml 的交互逻辑
    /// </summary>
    public partial class App : Application
    {
        public static IHttpClientFactory httpClientFactory;


        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            Regedit();
        }

        public static void Regedit()
        {
            var servces = new ServiceCollection();
            servces.AddHttpClient();
            var provider = servces.BuildServiceProvider();
            httpClientFactory = provider.GetRequiredService<IHttpClientFactory>();
        }
    }
}
